数据导入(部分key导入)+上传key文件

调用此接口做数据导入时,rollBackType强制为1,只能做部分key导入。

请求地址

/v2/webservice/table-data/import-with-key-file

请求方法

Post

请求参数说明(FormData)

参数名称类型是否必填说明
fileBlob是与目标端关联的key文件,文件名格式:{app_id}.{zone_id}.{table_name}.txt,例如:3.2.chat_area_rank.txt
importParamstring是例如:[{"srcAppId":2,"srcZoneId":4,"srcTableName":"chat_area_rank","dstAppId":3,"dstZoneId":2,"dstTableName":"chat_area_rank","importCmdType":0},{"srcAppId":2,"srcZoneId":4,"srcTableName":"table_generic","dstAppId":3,"dstZoneId":2,"dstTableName":"table_generic","importCmdType":0}]
ipListstring是在指定机器上构造数据。(当dataType为0时,可以为空数组json字符串:[])。示例:["9.135.102.211 tcaplus OP0ZrrnR0 /data/test/other","9.135.102.211 tcaplus OP0ZrrnR0 /data/test/other1"]
importSpeedstring是import speed,大于0小于等于50000或者-1,-1表示自适应速度,建议设置为-1
relateTaskIdstring是关联任务ID,dataType=1时,relateTaskId传0。
dataTypestring是数据来源,手动输入机器=1,关联任务ID=0
omsInternetDomainstring否OMS内网IP\域名,示例:http://9.135.102.211
deleteBeforeImportstring否import前是否先删除线上数据,默认值0不删除,1为删除

importParam参数

json字符串中参数说明

参数名称类型是否必填说明
srcAppIdnumber是源端项目ID
srcZoneIdnumber是源端区ID
srcTableNamestring是源端表名
dstAppIdnumber是目标端项目ID
dstZoneIdnumber是目标端区ID
dstTableNamestring是目标端表名
importCmdTypenumber是写入模式命令,0是Replace、TCAPLUS_API_LIST_ELEMENT_MOVEREPLACE_REQ,1是Insert、TCAPLUS_API_LIST_ADDAFTER_REQ

示例

{width=“8.333333333333334in” height=“3.3541666666666665in”}

{width=“7.479166666666667in” height=“4.6875in”}

返回参数说明

参数名称类型说明
set_idnumber集群ID
task_idnumber任务ID

返回示例

{ “code”: 0, “request_id”: “faca9e13-5ef0-4dd1-8103-ce53c7036c74”, “data”: { “set_id”: 1, “task_id”: 425, “user”: “tcaplus” } }